<template>
  <div class="talk_page">
    <a-steps progressDot direction="vertical" :current="current">
      <a-step title="1. 礼貌接听" description="设置我的接听开场白" @click="stepClick(0,true)" />
      <a-step title="2. 主人称呼" description="别人怎么称呼我" @click="stepClick(1,true)" />
      <a-step title="3. 意图分类" description="来电意图和闲聊处理" @click="stepClick(2,true)" />
    </a-steps>
    <div class="step_box mbm">
      <div :class="classname[0]" @click="stepClick(0)">
        <TalkStart></TalkStart>
      </div>
      <div :class="classname[1]" @click="stepClick(1)">
        <TalkWhom></TalkWhom>
      </div>
      <div :class="classname[2]" @click="stepClick(2)">
        <TalkIntent></TalkIntent>
      </div>
    </div>
  </div>
</template>

<script>
import TalkStart from "@/views/pages/talk/Start.vue";
import TalkWhom from "@/views/pages/talk/Whom.vue";
import TalkIntent from "@/views/pages/talk/Intent.vue";
export default {
  data() {
    return {
      current: 0,
      classname: []
    };
  },
  components: {
    TalkStart,
    TalkWhom,
    TalkIntent
  },
  methods: {
    stepClick(key) {
      this.current = key;
      
        this.classname = [];
        this.classname[key] = "step_action";
      
    }
  }
};
</script>

<style lang="less" scoped>

.talk_page {
  margin-bottom: 200px;
  margin-top: 50px;
  position: relative;
  .ant-steps-vertical {
    width: 200px;
    position: absolute;
    top: 0;
    left: 20px;
  }
  .ant-steps-item {
    cursor: pointer;
  }
}
.step_box {
  margin-left: 230px;
  .step_action {
    
    /deep/ .step_title {
      color: @primary-color;
    }
  }
}
</style>